import ajaxConf from "../service/ajaxConf.js";

export default class NewTop extends React.Component{
    constructor(props){
        super(props);
        this.state = {list:[]}
    }

    componentDidMount(){
        ajaxConf.GetSku.then((data)=>{
            console.log(data);
            this.setState({
                list:data.data
            });
        });
    }

    render(){
        return <ul>
            {this.state.list.map((sku)=>{
                return <li key={sku.skuId}>{sku.title}</li>
            })}
        </ul>
    }
}